<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
<head>
    <title>社会关系详细信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <script type="text/javascript" src="../../js/jquery/jquery-1.9.1.js"></script>
    <script src="../../js/news/page.js"></script>
    <script src="../../lib/laydate/laydate.js"></script>
    <script src="../../js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="../../css/news/new_news.css"/>
    <script src="/js/webOffice/fileShow.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/attachment/attachView.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" >
        var MYOA_JS_SERVER = "";
        var MYOA_STATIC_SERVER = "";
    </script>
    <style>

        #rs {
            display: inline-block;
            float: left;
            width: 78px;
            height: 38px;
            line-height: 35px;
            /*  margin-right: 30px;*/
            margin-top: 20px;
            margin-bottom: 20px;
            cursor: pointer;
            border-radius: 3px;
            background: url(../../img/newReturn.png) no-repeat;
            padding-left: 19px;
            font-size: 14px;
            margin-left: 50%;

        }


    </style>


</head>


<%--<script type="text/javascript" src="/inc/js_lang.php"></script>--%>
<%--<script type="text/javascript" src="/static/js/attach.js"></script>--%>

<body class="bodycolor">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
    <tr>
        <td class="Big"><img src="../../img/contractinfo.png" width="17" height="17"><span class="big3">社会关系详情</span><br>
        </td>
    </tr>
</table>
<br>
<table class="TableBlock" width="90%" align="center">
    <tr>
        <td nowrap align="left" width="120" class="TableContent">姓名：</td>
        <td nowrap align="left" class="TableData userName" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">成员姓名：</td>
        <td nowrap align="left" class="TableData staffName" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">与本人关系：</td>
        <td nowrap align="left" class="TableData relativeName" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">出生日期：</td>
        <td nowrap align="left" class="TableData birthDate" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">政治面貌：</td>
        <td align="left" class="TableData politicalOutlookName" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">职业：</td>
        <td nowrap align="left" class="TableData occupation" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">工作单位：</td>
        <td nowrap align="left" class="TableData workCompany" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">联系电话(单位)：</td>
        <td align="left" class="TableData phoneCall" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">联系电话(个人)：</td>
        <td nowrap align="left" class="TableData phone" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">联系电话(家庭)：</td>
        <td nowrap align="left" class="TableData telephone" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">单位地址：</td>
        <td align="left" colspan="3" class="TableData companyAddress" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">家庭地址：</td>
        <td align="left" colspan="3" class="TableData homeAddress" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">备注：</td>
        <td align="left" colspan="3" class="TableData remark" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">附件文档：</td>
        <td align="left" colspan="3" style="color: #0A5FA2" class="TableData attachName" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">登记时间：</td>
        <td align="left" colspan="3" class="TableData registerTime" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">最后修改时间：</td>
        <td align="left" colspan="3" class="TableData lastmodifyTime" width="180"></td>
    </tr>



    <tr align="center" class="TableControl">
        <td colspan="4">
            <%--   <input type="button" value="关闭" class="BigButton" onClick="window.close();" title="关闭窗口">--%>
            <div id="rs" type="save" class="btn_return"><fmt:message code="notice.th.return" /></div>
        </td>
    </tr>
</table>
</body>
<script>
    $(function(){
        var id=$.getQueryString('ids');

        $('#rs').click(function(){
            window.close();
        })

        $.ajax({
            url: "<%=basePath%>/hr/manage/getSocialRelationsById",
            type: "get",
            data: {
                'socialRelId':id
            },
            dataType: 'json',
            success: function (obj) {
                var data=obj.data;

                $('.userName').html(data.userName);
                $('.staffName').html(data.staffName);
                $('.relativeName').html(data.relativeName);
                $('.birthDate').html(data.birthDate);
                $('.politicalOutlookName').html(data.politicalOutlookName);
                $('.occupation').html(data.occupation);
                $('.workCompany').html(data.workCompany);
                $('.phoneCall').html(data.phoneCall);
                $('.phone').html(data.phone);
                $('.telephone').html(data.telephone);
                $('.companyAddress').html(data.companyAddress);
                $('.homeAddress').html(data.homeAddress);
                $('.remark').html(data.remarks);
                var str = "";
                var arrList=data.attachmentList;
                if(arrList.length>0) {
                   /* attachmentShow(arrList,'1',$('.attachName'),'1');*/
                    attachView(arrList,$('.attachName'),'1','0','1','0');
                  /*  for(var i = 0; i < data.attachmentList.length; i ++) {
                        str += data.attachmentList[i].attachName+",";
                    }
                    var str1 = str.substring(0, str.length-1);*/

                };
//                $('.attachName').html(str1);
                $('.registerTime').html(data.registerTime);
                $('.lastmodifyTime').html(data.lastmodifyTime);
            }
        })
        function getQueryString(name) {
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)return  unescape(r[2]); return null;
        }
    })
</script>
</html>


